//logs.js
const util = require('../../utils/util.js')

//http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.billboard.billList&type=1&size=10
//http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.song.play&songid=568320992

Page({
    data: {
        logs: []
    },
    onLoad: function() {
        this.setData({
            logs: (wx.getStorageSync('logs') || []).map(log => {
                return util.formatTime(new Date(log))
            })
        })
    }
})